<%@ page language="java" pageEncoding="UTF-8" %>
<%@ include file="/page/share/taglib.jsp" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <base href="<%=basePath%>">

    <title>房间列表</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <link rel="stylesheet" type="text/css" href="<%=basePath%>/css/base.css">

    <script type="text/javascript" src="<%=basePath%>/jslib/jquery.js"></script>
    <script language="JavaScript" type="text/javascript">
        function topage(page) {
            var form = document.getElementById("myform");
            document.getElementById("page")
                    .setAttribute("value", page);
            form.submit();
        }

        function allselect(allobj, items) {
            var state = allobj.checked;
            if (items.length > 0) {
                for (var i = 0; i < items.length; i++) {
                    if (!items[i].disabled) {
                        items[i].checked = state;
                    }
                }
            } else {
                if (!items.disabled)items.checked = state;
            }
        }

        /*
         *判断是否选择了记录
         */
        function ValidateIsSelect(allobj, items) {
            if (items.length > 0) {
                for (var i = 0; i < items.length; i++) {
                    if (items[i].checked) {
                        return true;
                    }
                }
            } else {
                if (items.checked)return true;
            }
            return false;
        }
    </script>

    <link type="text/css" rel="stylesheet" href="css/smartmenu.css">
    <script type="text/javascript" src="<%=basePath%>/jslib/index/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="<%=basePath%>/jslib/index/smartmenu-min.js"></script>
    <script type="text/javascript" src="<%=basePath%>/jslib/Menu.js"></script>

</head>

<body style="text-align: center">
<%@ include file="/page/share/menu.jsp" %>
<div id="content" style="height: 350px;">
<form action="RoomUsed!AllRoom.action" method="post" id="myform">
    <input type="hidden" name="method" value=""/>
    <input type="hidden" name="page" value="" id="page"/>
    <input type="hidden" name="query" value="${query}"/>

    <input type="hidden" name="roomId" value="${roomId}"/>
    <input type="hidden" name="good" value=""${good}/>
    <input type="hidden" name="roomStyle" value="${roomStyle}"/>
    <input type="hidden" name="beginSize" value="${beginSize}"/>
    <input type="hidden" name="endSize" value="${endSize}"/>

    <table align="center" border="1" cellspacing="0" id="list">
        <thead align="center">
        <tr>
            <td colspan="10" bgcolor="6f8ac4" align="right">
                <%@ include file="/page/share/fenye.jsp" %>
            </td>
        </tr>
        <tr>

            <td>
                房间号
            </td>
            <td>
                是否完整
            </td>
            <td>
                房间风格
            </td>
            <td>
                大小
            </td>
            <td>
                是否使用
            </td>
        </tr>

        <s:iterator value="pageView.records" var="room">
            <tr>
                <td>${room.roomId}</td>
                <td><s:if test="#room.good">设备正常</s:if>
                    <s:if test="!#room.good">设备异常</s:if>
                </td>
                <td>${room.roomStyle}</td>
                <td>${room.size}</td>
                <td>

                    <s:iterator value="usingRooms" var="r">
                        <s:if test="#room.roomId == #r">
                            <s:set var="f" value="1"></s:set>
                        </s:if>
                    </s:iterator>
                    <s:if test="#f == 1">使用中</s:if>
                    <s:else>未使用</s:else>

                </td>
            </tr>

        </s:iterator>
        </thead>
    </table>

</form>
</div>
<div id="bottom">
    <ul>
        <li>
            联系我们：
            <a href="mailto:willsonz@qq.com?subject=KTV综合管理系统">willsonz@qq.com</a>
        </li>
    </ul>
    <ul>
        <li>
            ©&nbsp;Made By Cloud Team.
        </li>
    </ul>
</div>
</body>
</html>